<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>Pico: Código-Fonte de node.h</title>
<link href="tabs.css" rel="stylesheet" type="text/css">
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Gerado por Doxygen 1.5.8 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Página&nbsp;Principal</span></a></li>
      <li><a href="annotated.html"><span>Estruturas&nbsp;de&nbsp;Dados</span></a></li>
      <li class="current"><a href="files.html"><span>Arquivos</span></a></li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="files.html"><span>Lista&nbsp;de&nbsp;Arquivos</span></a></li>
      <li><a href="globals.html"><span>Globais</span></a></li>
    </ul>
  </div>
<h1>node.h</h1><a href="node_8h.html">Vá para a documentação deste arquivo.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 
<a name="l00005"></a>00005 <span class="preprocessor">#ifndef _NODE_H_</span>
<a name="l00006"></a>00006 <span class="preprocessor"></span><span class="preprocessor">#define _NODE_H_</span>
<a name="l00007"></a>00007 <span class="preprocessor"></span>
<a name="l00008"></a>00008 <span class="preprocessor">#include &lt;stdio.h&gt;</span> 
<a name="l00009"></a>00009 
<a name="l00010"></a>00010 <span class="keyword">typedef</span> <span class="keywordtype">int</span> Node_type;
<a name="l00011"></a>00011 
<a name="l00012"></a>00012 <span class="comment">/* Seria de constantes que servirao para definir tipos de nos (na arvore). */</span>
<a name="l00013"></a>00013 <span class="preprocessor">#define program_node   299</span>
<a name="l00014"></a>00014 <span class="preprocessor"></span><span class="preprocessor">#define idf_node       300</span>
<a name="l00015"></a>00015 <span class="preprocessor"></span><span class="preprocessor">#define int_node       301</span>
<a name="l00016"></a>00016 <span class="preprocessor"></span><span class="preprocessor">#define float_node     302</span>
<a name="l00017"></a>00017 <span class="preprocessor"></span><span class="preprocessor">#define str_node       303</span>
<a name="l00018"></a>00018 <span class="preprocessor"></span><span class="preprocessor">#define empty_node     304</span>
<a name="l00019"></a>00019 <span class="preprocessor"></span><span class="preprocessor">#define proc_node      305</span>
<a name="l00020"></a>00020 <span class="preprocessor"></span><span class="preprocessor">#define param_node     306</span>
<a name="l00021"></a>00021 <span class="preprocessor"></span><span class="preprocessor">#define decl_node      307</span>
<a name="l00022"></a>00022 <span class="preprocessor"></span><span class="preprocessor">#define decl_list_node 308</span>
<a name="l00023"></a>00023 <span class="preprocessor"></span><span class="preprocessor">#define op_node        309</span>
<a name="l00024"></a>00024 <span class="preprocessor"></span><span class="preprocessor">#define nop_node       310</span>
<a name="l00025"></a>00025 <span class="preprocessor"></span><span class="preprocessor">#define return_node    311</span>
<a name="l00026"></a>00026 <span class="preprocessor"></span><span class="preprocessor">#define if_node        312</span>
<a name="l00027"></a>00027 <span class="preprocessor"></span><span class="preprocessor">#define while_node     313</span>
<a name="l00028"></a>00028 <span class="preprocessor"></span><span class="preprocessor">#define print_node     314</span>
<a name="l00029"></a>00029 <span class="preprocessor"></span><span class="preprocessor">#define cond_node      315</span>
<a name="l00030"></a>00030 <span class="preprocessor"></span><span class="preprocessor">#define affect_node    316</span>
<a name="l00031"></a>00031 <span class="preprocessor"></span><span class="preprocessor">#define or_node        317</span>
<a name="l00032"></a>00032 <span class="preprocessor"></span><span class="preprocessor">#define and_node       318</span>
<a name="l00033"></a>00033 <span class="preprocessor"></span><span class="preprocessor">#define eq_node        319</span>
<a name="l00034"></a>00034 <span class="preprocessor"></span><span class="preprocessor">#define neq_node       320</span>
<a name="l00035"></a>00035 <span class="preprocessor"></span><span class="preprocessor">#define inf_node       321</span>
<a name="l00036"></a>00036 <span class="preprocessor"></span><span class="preprocessor">#define sup_node       322</span>
<a name="l00037"></a>00037 <span class="preprocessor"></span><span class="preprocessor">#define inf_eq_node    323</span>
<a name="l00038"></a>00038 <span class="preprocessor"></span><span class="preprocessor">#define sup_eq_node    324</span>
<a name="l00039"></a>00039 <span class="preprocessor"></span><span class="preprocessor">#define plus_node      325</span>
<a name="l00040"></a>00040 <span class="preprocessor"></span><span class="preprocessor">#define minus_node     326</span>
<a name="l00041"></a>00041 <span class="preprocessor"></span><span class="preprocessor">#define mult_node      327</span>
<a name="l00042"></a>00042 <span class="preprocessor"></span><span class="preprocessor">#define div_node       328</span>
<a name="l00043"></a>00043 <span class="preprocessor"></span><span class="preprocessor">#define mod_node       329</span>
<a name="l00044"></a>00044 <span class="preprocessor"></span><span class="preprocessor">#define umenos_node    330</span>
<a name="l00045"></a>00045 <span class="preprocessor"></span><span class="preprocessor">#define not_node       331</span>
<a name="l00046"></a>00046 <span class="preprocessor"></span><span class="preprocessor">#define char_node      332</span>
<a name="l00047"></a>00047 <span class="preprocessor"></span><span class="preprocessor">#define bloc_node      333</span>
<a name="l00048"></a>00048 <span class="preprocessor"></span><span class="preprocessor">#define true_node      335</span>
<a name="l00049"></a>00049 <span class="preprocessor"></span><span class="preprocessor">#define false_node     336</span>
<a name="l00050"></a>00050 <span class="preprocessor"></span>
<a name="l00055"></a><a class="code" href="node_8h.html#09a8473c6902dc780c5056f2df196911">00055</a> <span class="preprocessor">#define MAX_CHILDREN_NUMBER 10</span>
<a name="l00056"></a>00056 <span class="preprocessor"></span>
<a name="l00057"></a>00057 <span class="keyword">typedef</span> <span class="keyword">struct </span>_node {
<a name="l00058"></a>00058    <span class="keywordtype">int</span> num_line;   
<a name="l00059"></a>00059    <span class="keywordtype">int</span> id;         
<a name="l00060"></a>00060    <span class="keywordtype">char</span>* lexeme;   
<a name="l00061"></a>00061    Node_type type; 
<a name="l00062"></a>00062    <span class="keywordtype">void</span>* attribute;
<a name="l00063"></a>00063    <span class="keywordtype">int</span> nFilhos;    
<a name="l00064"></a>00064    <span class="keyword">struct </span>_node** filhos;  
<a name="l00065"></a>00065 } Node;
<a name="l00066"></a>00066 
<a name="l00079"></a>00079 Node* <a class="code" href="node_8h.html#3bf702618dee6354751e95c9c0f800c9">create_node</a>(<span class="keywordtype">int</span> nl, Node_type t, <span class="keywordtype">char</span>* lexema, 
<a name="l00080"></a>00080                   <span class="keywordtype">void</span>* att, <span class="keywordtype">int</span> nbc, Node** children) ;
<a name="l00081"></a>00081 
<a name="l00090"></a>00090 Node* <a class="code" href="node_8h.html#c796e8a6c8fa6a58d06f7094152816bb">create_leaf</a>(<span class="keywordtype">int</span> nl, Node_type t, <span class="keywordtype">char</span>* lexema, <span class="keywordtype">void</span>* att) ;
<a name="l00091"></a>00091 
<a name="l00095"></a>00095 <span class="keywordtype">int</span> <a class="code" href="node_8h.html#a7faef607e574100e30b08bb3b00fe0d">nb_of_children</a>(Node* n);
<a name="l00096"></a>00096 
<a name="l00104"></a>00104 Node* <a class="code" href="node_8h.html#e033a5706b5c6d0058874e04c9a7c180">child</a>(Node* n, <span class="keywordtype">int</span> i) ;
<a name="l00105"></a>00105 
<a name="l00121"></a>00121 <span class="keywordtype">int</span> <a class="code" href="node_8h.html#1e1a21ca62ad4d35baa0bf0694e5a241">pack_nodes</a>(Node*** array_of_nodes, <span class="keywordtype">int</span> cur_size, Node* n);
<a name="l00122"></a>00122 
<a name="l00126"></a>00126 <span class="keywordtype">int</span> <a class="code" href="node_8h.html#58649350a2079d8c22fdf5b005a82bf2">deep_free_node</a>(Node* n) ;
<a name="l00127"></a>00127 
<a name="l00131"></a>00131 <span class="keywordtype">int</span> <a class="code" href="node_8h.html#4af6752a1b7e972b6b108010956f41b2">height</a>(Node *n) ;
<a name="l00132"></a>00132 
<a name="l00133"></a>00133 
<a name="l00134"></a>00134 <span class="preprocessor">#endif</span>
</pre></div></div>
<hr size="1"><address style="text-align: right;"><small>Gerado em Wed Mar 11 20:54:59 2009 para Pico por&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address>
</body>
</html>
